var pageii = null;
var grid = null;
$(function() {
	grid = lyGrid({
		pagId : 'paging',
		l_column : [{
			colkey : "date",
			name : "日期"
		}, {
			colkey : "",
			name : "模具编号？？？"
		}, {
			colkey : "",
			name : "客户名称？？？"
		}, {
			colkey : "manufacturers",
			name : "供应商名称"
		}],
		jsonUrl : rootPath + '/surfaceCheck/surfaceCheck_findByPage.shtml',
		dymCol:true,
		checkbox : true,
		serNumber : false
	});
	$("#editFun").click("click", function() {
		editAccount();
	});
	$("#search").click("click", function() {
		var searchParams = $("#searchForm").serializeJson();
		grid.setOptions({
			data : searchParams
		});
	});
});
function editAccount() {
	var cbox = grid.getSelectedCheckbox();
	if (cbox.length > 1 || cbox == "") {
		layer.msg("只能选中一个");
		return;
	}
	pageii = layer.open({
		title : "编辑模具制造外观质量验收单",
		type : 2,
		area : [ "800px", "100%" ],
		content : rootPath + '/surfaceCheck/surfaceCheck_edit.shtml?id=' + cbox
	});
}




